package cn.zhou.mapper;

import cn.zhou.domain.Account;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author zy9524
 * @date 2019/6/9 14:47
 */
@Repository
public interface AccountMapper {

    @Select("select * from account")
    List<Account> findAllAccount();

    @Update("update account set money = money + #{money} where name = #{name} ")
    void transMoney(@Param("name") String name, @Param("money")Float money);
}
